Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Verify  that  a  Computer  is  a  Global  Catalog  Server  

 Content of Verify that a Computer is a Global Catalog Server.vbs
MD5 Hash: 0409C47069001473F1D2F9A92CC0C482
' Description: Indicates whether or not the atl-dc-01 domain controller is a global catalog server.


strComputer = "atl-dc-01"

Const NTDSDSA_OPT_IS_GC = 1

Set objRootDSE = GetObject("LDAP://" & strComputer & "/rootDSE")
strDsServiceDN = objRootDSE.Get("dsServiceName")
Set objDsRoot = GetObject("LDAP://" & strComputer & "/" & strDsServiceDN)
intOptions = objDsRoot.Get("options")

If intOptions And NTDSDSA_OPT_IS_GC Then
WScript.Echo strComputer & " is a global catalog server."
Else
Wscript.Echo strComputer & " is not a global catalog server."
End If

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a